package com.acme.bankapp.service.bank;

import com.acme.bankapp.domain.bank.Bank;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * Created with IntelliJ IDEA.
 * User: Alfeya
 * Date: 30.11.14
 * Time: 23:16
 * To change this template use File | Settings | File Templates.
 */
public class BankServer {
    public void startServer(Bank bank) throws IOException {
        int port = 9999;
        while(true) {
            ServerSocket serverSocket = new ServerSocket(port);
            System.out.println("Begin listening port " + port);
            Socket socket = serverSocket.accept();
            DataInputStream dis = new DataInputStream(socket.getInputStream());
            DataOutputStream dos = new DataOutputStream(socket.getOutputStream());
            System.out.println("New user begin connection");
        }
    }
}
